package com.gitee.ly.cloundgateway;

import com.gitee.ly.DiscoverAndLoadBalanceAutoConfiguration;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.cloud.gateway.filter.GlobalFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@ConditionalOnClass({GlobalFilter.class})
@AutoConfigureAfter(DiscoverAndLoadBalanceAutoConfiguration.class)
@Configuration
public class CloundGateWayDiscoverAndLoadBalanceAutoConfiguration {
    @Bean
    public LightRegistryGlobalFilter lightRegistryGlobalFilter(BeanFactory beanFactory) {
        return new LightRegistryGlobalFilter(beanFactory);
    }
}
